package test;

import java.util.Arrays;
import java.util.Scanner;

public class exercise_1 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int[] nums = new int[8];
		int sum=0;
		for(int i=0;i<nums.length;i++) {
			System.out.print("please input score:");
			nums[i] = in.nextInt();
			sum +=nums[i];
		}
		System.out.println(Arrays.toString(nums));
		for(int i:nums) {
			System.out.println(i);
		}
		System.out.printf("sum:%d average:%f\n",sum,(double)sum/8);
		Arrays.sort(nums);
		System.out.println(Arrays.toString(nums));
	}

}
